import http from './http'
/**
 * 体检预约
 *
 * @author twt
 * @since 2025-04-14 16:25:35
 */
//user
//通过ID查询单条数据
export const queryById = (id: number) => {
  return http.get(`/appointments/${id}`)
}
//用户预约套餐
export const booking = (data: { packageId: number; appointmentTime: Date }) => {
  return http.post('/appointments', data)
}

//我的预约
export const myAppointments = () => {
  return http.get(`/appointments/me`)
}

//admin
//查询全部
export const queryAll = () => {
  return http.get(`/appointments`)
}
//删除数据
export const deleteAppointment = (id: number) => {
  return http.delete(`/appointments/${id}`)
}
